<template>
    <div>
      <div class="tab-nav "> 
        <div class="wrapper"> 
          <ul class="fl sui-nav nav-tabs navbar-dark"> 
                <!-- <li class="active"><a href="#index" data-toggle="tab">首页</a></li> 
                <li><a href="#php" data-toggle="tab">Php</a></li> 
                <li><a href="#js" data-toggle="tab">Javascript </a></li> 
                <li><a href="#python" data-toggle="tab">Python</a></li> 
                <li><a href="#java" data-toggle="tab">Java</a></li>  -->
                 <router-link tag="li" to="/qa/label/0" active-class="active" exact  ><a> 首页</a></router-link>
                <router-link tag="li" :to="'/qa/label/'+item.id" active-class="active" v-for="(item,index) in labelList" :key="index"  >                
                    <a>{{item.labelname}} </a>
                </router-link>     
          </ul> 
          <span class="fr more"><a href="./qa-allTag.html" target="_blank">更多</a></span> 
          <div class="clearfix"></div> 
        </div> 
     </div>
     <nuxt-child/>
    </div>
</template>
<script>
import '~/assets/css/page-sj-qa-logined.css'
import labelApi from "@/api/label"
export default {
    asyncData ({ params, error}) {        
        return labelApi.toplist().then((res) => {
            return {labelList: res.data.data  } 
        })      
    }
}
</script>